#include "StdAfx.h"
#include "CMDs.h"
#include "Command.h"
#include "Player.h"

//Initialisation of the commandwords
template <> string CMD<CMDQuit>::CommandWord = "quit";
template <> string CMD<CMDMove>::CommandWord = "move";
template <> string CMD<CMDLook>::CommandWord = "look";

//Defining what each command should do
void CMDQuit::DoAction()
{
	exit(0);
}

//TODO: needs real implementation using the index to the next location
void CMDMove::DoAction()
{
	Player* p = Player::GetInstance();
	p->CurrentLocation = 1;
}

void CMDLook::DoAction()
{
	Player* p = Player::GetInstance();
	DisplayText(p->GetCurrentLocation()->Description);
}
